package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Employee employee);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    void updateByPrimaryKey(Employee employee);
   // int selectForCount(QueryObject qo);

    List<Employee> selectForList(QueryObject qo);
    //处理关系表
    void insertRelation(@Param("eid") Long eid, @Param("rid") Long rid);

    void deleteRelation(Long id);
    //用方法 通过员工ID查询到角色ID 再通过角色ID获取到角色name
    List<Role> selectRoleNameByEmpId(Long id);

}